﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field ID="{373B4CE9-B62D-471a-911A-F06489A36521}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="NewWindow" StaticName="NewWindow" Group="Window Links" DisplayName="New Window">
  </Field>
  <Field ID="{EB2D409D-BC43-4d53-A89D-BC6EF3D6E469}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="ShowStatusBar" StaticName="ShowStatusBar" Group="Window Links" DisplayName="Show Status Bar">
  </Field>
  <Field ID="{3A239AE3-237E-44ee-9168-F6E863A424A0}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="ShowToolbar" StaticName="ShowToolbar" Group="Window Links" DisplayName="Show Toolbar">
  </Field>
  <Field ID="{6227543C-1590-4c92-98A4-9CCD747CAA64}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="ShowAddressBar" StaticName="ShowAddressBar" Group="Window Links" DisplayName="Show Address Bar">
  </Field>
  <Field ID="{502F7991-217B-42cd-BF70-3D64E34445F2}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="ShowMenuBar" StaticName="ShowMenuBar" Group="Window Links" DisplayName="Show Menu Bar">
  </Field>
  <Field ID="{13843526-86BA-4e67-A059-02A51FF98DC8}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="ShowScrollbars" StaticName="ShowScrollbars" Group="Window Links" DisplayName="Show Scrollbars">
  </Field>
  <Field ID="{71BE26D2-905F-41b3-AA9B-2916C9E8E667}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Boolean" Name="AllowResize" StaticName="AllowResize" Group="Window Links" DisplayName="Allow Resizing">
  </Field>
  <Field ID="{A01E6CB4-CED3-4344-A90A-0E5ABE5B17CE}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Text" Name="NewWindowHeight" StaticName="NewWindowHeight" Group="Window Links" DisplayName="New Window Height">
  </Field>
  <Field ID="{B508BE91-FB40-47a9-903D-EB3FABF5D4AA}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Text" Name="NewWindowWidth" StaticName="NewWindowWidth" Group="Window Links" DisplayName="New Window Width">
  </Field>
  <Field ID="{3F0C0B39-9513-445d-AAE9-6977DC9541F0}" SourceID="http://schemas.microsoft.com/sharepoint/" Type="Computed" Name="ComputedLink" StaticName="ComputedLink" Group="Window Links" DisplayName="Enhanced URL">
    <FieldRefs>
      <FieldRef Name="URL" />
      <FieldRef Name="NewWindow" />
      <FieldRef Name="ShowStatusBar" />
      <FieldRef Name="ShowToolbar" />
      <FieldRef Name="ShowAddressBar" />
      <FieldRef Name="ShowMenuBar" />
      <FieldRef Name="ShowScrollbars" />
      <FieldRef Name="AllowResize" />
      <FieldRef Name="NewWindowHeight" />
      <FieldRef Name="NewWindowWidth" />
    </FieldRefs>
    <DisplayPattern>
      <Switch>
        <Expr>
          <Column Name="NewWindow" />
        </Expr>
        <Case Value="1">
          <HTML><![CDATA[<a href="javascript:var w = window.open(']]></HTML>
          <Column Name="URL" HTMLEncode="TRUE" />
          <HTML><![CDATA[','','status=]]></HTML>
          <Column Name="ShowStatusBar" />
          <HTML><![CDATA[,toolbar=]]></HTML>
          <Column Name="ShowToolbar" />
          <HTML><![CDATA[,location=]]></HTML>
          <Column Name="ShowAddressBar" />
          <HTML><![CDATA[,menubar=]]></HTML>
          <Column Name="ShowMenuBar" />
          <HTML><![CDATA[,scrollbars=]]></HTML>
          <Column Name="ShowScrollbars" />
          <HTML><![CDATA[,resizable=]]></HTML>
          <Column Name="AllowResize" />
          <HTML><![CDATA[,height=]]></HTML>
          <Column Name="NewWindowHeight" />
          <HTML><![CDATA[,width=]]></HTML>
          <Column Name="NewWindowWidth" />
          <HTML><![CDATA[');">]]></HTML>
        </Case>
        <Default>
          <HTML><![CDATA[<a href="]]></HTML>
          <Column Name="URL" HTMLEncode="TRUE" />
          <HTML><![CDATA[">]]></HTML>
        </Default>
      </Switch>
      <Switch>
        <Expr>
          <Column2 Name="URL" />
        </Expr>
        <Case Value="">
          <Column Name="URL" HTMLEncode="TRUE"/>
        </Case>
        <Default>
          <Column2 Name="URL" HTMLEncode="TRUE" />
        </Default>
      </Switch>
      <HTML><![CDATA[</a>]]></HTML>
    </DisplayPattern>
  </Field>
  <ContentType ID="0x0105009CF2B6DD590546b09CB4D69F92764D88"
	Name="Window Link"
	Group="Window Links"
	Description="A link that opens in a new window"
	Version="0">
    <FieldRefs>
      <FieldRef ID="{373B4CE9-B62D-471a-911A-F06489A36521}" Name="NewWindow" DisplayName="New Window" />
      <FieldRef ID="{EB2D409D-BC43-4d53-A89D-BC6EF3D6E469}" Name="ShowStatusBar" DisplayName="Show Status Bar" />
      <FieldRef ID="{3A239AE3-237E-44ee-9168-F6E863A424A0}" Name="ShowToolbar" DisplayName="Show Toolbar" />
      <FieldRef ID="{6227543C-1590-4c92-98A4-9CCD747CAA64}" Name="ShowAddressBar" DisplayName="Show Address Bar" />
      <FieldRef ID="{502F7991-217B-42cd-BF70-3D64E34445F2}" Name="ShowMenuBar" DisplayName="Show Menu Bar" />
      <FieldRef ID="{13843526-86BA-4e67-A059-02A51FF98DC8}" Name="ShowScrollbars" DisplayName="Show Scrollbars" />
      <FieldRef ID="{71BE26D2-905F-41b3-AA9B-2916C9E8E667}" Name="AllowResize" DisplayName="Allow Resizing" />
      <FieldRef ID="{A01E6CB4-CED3-4344-A90A-0E5ABE5B17CE}" Name="NewWindowHeight" DisplayName="New Window Height" />
      <FieldRef ID="{B508BE91-FB40-47a9-903D-EB3FABF5D4AA}" Name="NewWindowWidth" DisplayName="New Window Width" />
      <FieldRef ID="{3F0C0B39-9513-445d-AAE9-6977DC9541F0}" Name="ComputedLink" DisplayName="Enhanced URL"/>
    </FieldRefs>
  </ContentType>
  <ListTemplate
        Name="WindowLinks"
        Type="103"
        BaseType="0"
        OnQuickLaunch="TRUE"
        SecurityBits="11"
        Sequence="310"
        DisplayName="Window Links"
        Description="A list for links that can be opened in new windows"
        Image="/_layouts/images/itlink.gif" />
</Elements>
